class AddProjectsAndAssignments < ActiveRecord::Migration
  def self.up
     create_table :projects do |t|
        t.column :created_at,   :timestamp, :null => false
        t.column :user_id,      :integer,   :null => false
        t.column :item_id,      :integer,   :null => false
        t.column :experience,   :integer,   :default => 0
     end

     create_table :assignments do |t|
        t.column :created_at,      :timestamp, :null => false
        t.column :project_id,      :integer,   :null => false
        t.column :user_id,         :integer,   :null => false
        t.column :instructions,    :text,      :null => false
        t.column :experience,      :integer
        t.column :experience_desc, :text
     end

     add_index :assignments,    :user_id
     add_index :assignments,    :project_id
  end

  def self.down
  end
end
